<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>弹幕效果</title>
  <style>
 @keyframes barrage{
   from{
     left:100%;
     transform:translateX(0);
   }
   to{
     left:0;
     transform:translateX(-100%);
   }
}
.block{
  position:absolute;
  animation:barrage 5s linear 0s;
}

  </style>
</head>

<body>
    <div class="block">我是弹幕</div>

</body>

</html>